package com.xxl.sso.server.controller;

import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.feign.service.SysCarouselFeignService;
import com.alibaba.algo.cooperation.feign.vo.res.SysCarouselResponseVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类SysCarouselController.java的实现描述：用户系统轮播图表 Controller
 *
 */
@Slf4j
@RestController
@RequestMapping(value = "/usercenter-admin-app/admin/sysCarousel")
public class SysCarouselController {

    @Autowired
    private SysCarouselFeignService sysCarouselService;

    /**
     * 系统配置页面获取登录页面的配置信息，或配置页面编辑时获取当前已配置过的信息
     * @return
     */
    @GetMapping()
    public BaseResult<SysCarouselResponseVO> getSysCarousel() {
        SysCarouselResponseVO sysCarouselResponseVO =  sysCarouselService.selectOne();
        return BaseResult.buildSuccess(sysCarouselResponseVO);
    }
}
